<template>
	<view class="content">
		<view class="box_bg"
			:style="'background: url('+ c_imgPath + 'indexBg.png'+ ') repeat-y 0 0 / 100% auto;'">
			
		</view>
		<view class="news_z">
			<view v-for="(item,index) in goods" :key="index" class="con">
				<view class="con_l">
					<view class="time_box">
						<view>{{item.day}}</view>
						<view>{{item.month}}</view>
					</view>
					<view class="yuan2">
						<view class="yuan3"></view>
					</view>
				</view>
				<view class="con_r" @click="todetails(item)">
					<image :src="item.imgurl"></image>
					<view class="time">{{item.title}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				goods: [],
				c_imgPath: 'https://qt.yhemall.com/shouye/',
			}
		},
		onLoad(v) {
			// this.rili_url = uni.getStorageSync('rili')
			this.getData()
		},
		methods: {
			todetails(e) {
				// 无限赏
				// if (e.type == 2) {
				// 	uni.navigateTo({
				// 		url: 'detail_wuxian?goods_id=' + e.goods_id
				// 	})
				// } else {
				if (e.goods_id !== 0) {
					uni.navigateTo({
						url: 'detail?goods_id=' + e.goods_id
					})
				}

				// }

			},
			getData() {
				let that = this;
				that.req({
					url: 'yushourili',
					Loading: true,
					data: {
						goods_id: that.goods_id
					},
					success(res) {
						if (res.status == 1) {
							that.goods = res.data;
						}

					}
				})
			},
		}

	}
</script>

<style>
	.news_z {
		width: 690rpx;
		margin: 20rpx auto 0;
		border-radius: 10rpx;
	}

	.yuan3 {
		width: 24rpx;
		height: 24rpx;
		background: #B07CDD;
		border-radius: 50%;
	}

	.yuan2 {
		/* background: rgba(255, 117, 20, 0.3); */
		width: 36rpx;
		height: 36rpx;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		background: #FFFFFF;
	}

	.time {
		color: #989898;
		margin-top: 20rpx;
	}

	.time_box>view:nth-of-type(1) {
		font-size: 54rpx;
		font-weight: bold;
	}

	.time_box {
		/* position: absolute; */
		color: #FFFFFF;
		width: 80rpx;
	}

	.con_l {
		width: 200rpx;
		display: flex;
		/* justify-content: space-between; */
		align-items: center;
		position: relative;
	}

	.con_r>image {
		width: 512rpx;
		height: 231rpx;
		border-radius: 7rpx;
	}

	.con_r {
		width: 540rpx;
		font-size: 24rpx;
		border-bottom: 1px solid #333333;
		padding: 20rpx 0;
		margin-right: 20rpx;
	}

	.yuan {
		width: 24rpx;
		height: 24rpx;
		background: #dddddd;
		border-radius: 50%;
	}

	.con {
		display: flex;
		align-items: center;
		width: 100%;
	}

	.content {
		width: 100vw;
		min-height: 100vh;
		padding: 1rpx 0 50rpx 0;
	}
</style>
